<extend name="Index::index"/>
<block name="title"><title>场次修改</title></block>
<block name="main">
    <!--右内容区域-->
    <div class="layout-content">

        <div class="page-title">场次管理</div>

        <div class="content-top">
            <ul class="top-nav">
                <li class="active"><span>修改场次信息</span></li>
            </ul>
            <div class="clearfix"></div>
        </div>


        <!--content-main start-->
        <div class="container-fluid content-main">
            <div class="row">
                <div class="col-md-12">
                    <?php if(isset($_SESSION['message']))
                    {
                        $message=$_SESSION['message'];
                        unset($_SESSION['message']);
                    ?>
                    <div class="ui-tips bg-info">
                        <span class="icon glyphicon glyphicon-info-sign"></span>
                        <span><?php echo $message;?></span>
                    </div>
                    <?php }?>
                </div>

                    <form action="{:U('updateA',['id'=>$id])}" class="form-horizontal" method="post" enctype="multipart/form-data">

                        <div class="form-group">
                            <label class="col-sm-2 control-label">电影名称</label>

                            <div class="col-sm-8">
                                <select name="movie_id" class="form-control">
                                    <?php foreach( $list as $key => $value ){ ?>
                                    <option value="{$value['id']}"  <?php echo $model['movie_id'] == $key+1? 'selected': ''?>    >{$value['name']}</option>
                                    <?php } ?>
                                </select>
                                <span class="help-block"></span>
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-sm-2 control-label">放映厅</label>

                            <div class="col-sm-8">
                                <select name="room_id" class="form-control">
                                    <?php foreach( $room as $key => $value ){ ?>
                                    <option value="{$value['id']}"  <?php echo $model['room_id'] == $key+1 ? 'selected': ''?>    >{$value['name']}</option>
                                    <?php } ?>
                                </select>
                                <span class="help-block"></span>
                            </div>

                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">放映时间</label>
                            <div class="col-sm-8">
                                <input type="datetime-local" name="showtime" class="form-control">
                                <span class="help-block"></span>
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-sm-2 control-label">单价</label>
                            <div class="col-sm-8">
                                <input type="text" name="price" class="form-control" value="{$model.price}"  onfocus="abc(this)">
                                <span class="help-block"></span>
                            </div>
                        </div>
                        <script>
                            function abc(obj) {
                                $(obj).val('');
                            }
                        </script>

                        <div class="form-group">
                            <div class="col-sm-offset-2 col-sm-8">
                                <button type="submit" class="btn btn-default">修改提交</button>
                            </div>
                        </div>
                    </form>


                </div>
            </div>

        </div>
        <!--右内容区域结束-->
</block>